package com.istock.union.user.model;

import java.io.Serializable;

public class CredentialRoleInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 
     */
    private String id;

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 身份ID
     */
    private String credentialId;

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 角色ID
     */
    private String roleId;

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 鑾峰緱 
     */
    public String getId() {
        return id;
    }

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 璁剧疆 
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 鑾峰緱 身份ID
     */
    public String getCredentialId() {
        return credentialId;
    }

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 璁剧疆 身份ID
     */
    public void setCredentialId(String credentialId) {
        this.credentialId = credentialId == null ? null : credentialId.trim();
    }

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 鑾峰緱 角色ID
     */
    public String getRoleId() {
        return roleId;
    }

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 璁剧疆 角色ID
     */
    public void setRoleId(String roleId) {
        this.roleId = roleId == null ? null : roleId.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", credentialId=").append(credentialId);
        sb.append(", roleId=").append(roleId);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CredentialRoleInfo other = (CredentialRoleInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCredentialId() == null ? other.getCredentialId() == null : this.getCredentialId().equals(other.getCredentialId()))
            && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCredentialId() == null) ? 0 : getCredentialId().hashCode());
        result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
        return result;
    }
}